/*
 * @Author: ReinerLau lk850593913@gmail.com
 * @Date: 2022-09-14 12:43:12
 * @LastEditors: ReinerLau lk850593913@gmail.com
 * @LastEditTime: 2022-09-14 16:50:28
 * @FilePath: \robot\src\api\robot-device.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from "@/utils/request";

export function getByCarLink(code, type) {
  return request({
    url: `/robot-device/v1/getbyrid/${code}&${type}`,
    method: "get",
  });
}

export function getDevice(id) {
  return request({
    url: `/robot-device/v1/get-device/${id}`,
    method: "get",
  });
}

export function deleteRobotDevice(id) {
  return request({
    url: `/robot-device/v1/${id}`,
    method: "delete",
  });
}

export function createRobotDevice(data) {
  return request({
    url: "/robot-device/v1/",
    method: "post",
    data: data,
  });
}

export function updateRobotDevice(data) {
  return request({
    url: "/robot-device/v1/",
    method: "put",
    data: data,
  });
}
